
/**
 * @author Khurana
 *
 */
public class TvDemoWithGetSet {

	public static void main(String[] args) 
	{
		TvWithGetSet tv = new TvWithGetSet();
		
		//boolean tvPower =false;
		boolean tvPower =true;
		
		String source="tv";
		//String source="pc";
		//String source="hdmi 1";
		//String source="hdmi 2";
		//String source="hdmi 3";
		//String source="default";
		
		tv.setTvsource(source);
		
		
		if(tvPower==true)
		{
			//tv is already on and it is asking to select source.
			System.out.println("Select source");
			switch (tv.getTvsource())
			{
				case "tv" :
				{
					System.out.println("select channel");
				}
				    break;
				
				case "pc" : 
				{
					System.out.println("Select Pc Source");
				}
				    break;
				
				case "hdmi 1" :
				{
					System.out.println("Select hdmi 1 Source");
				}
				    break;
				
				case "hdmi 2" :
				{
					System.out.println("Select hdmi 2 Source");
				}
				    break;
				
				case "hdmi 3" : 
				{
					System.out.println("Select hdmi 3 Source");
				}
				    break;
				
				default: System.out.println("select source.");
				    break;	
			
			}
			
			System.out.println("if you are done watching tv, switch it off.");
			//this is switching tv off.
			tv.setPower(false);
			System.out.println("\nTv is switched off now");
			
		}
			
		else 
		{
			
			//here tv is switching on.
			System.out.println("Switch the tv on.");
			tv.setPower(true);
		}
		
		
		
		
	}


}
